<link rel="stylesheet" href="__PUBLIC__/js/friend_suggest/ui.friendsuggest.css" type="text/css" media="screen" charset="utf-8" />


<php>if(!$no){</php>
	<script type="text/javascript" src="__PUBLIC__/js/friend_suggest/ui.friendsuggest.js"></script>
	<script>var no_edit = 0;</script>
<php>}</php>


<script>
    $(document).ready( function(){
        var id ="";
        var test = new giant.ui.friendsuggest({

			btnAll:"#ui-fs{$id} .ui-fs-icon",
			btnCloseAllFriend:"#ui-fs{$id} .ui-fs-all .close",
			btnNextPage:"#ui-fs{$id} .ui-fs-all .next",
			btnPrevPage:"#ui-fs{$id} .ui-fs-all .prev",
			selectFriendType:"#ui-fs-friendtype{$id}",
			allFriendContainer:"#ui-fs{$id} .ui-fs-all" ,
			allFriendListContainer:"#ui-fs{$id} .ui-fs-all .ui-fs-allinner div.list",
			frinedNumberContainer:"#ui-fs{$id} .ui-fs-allinner .page b",
			resultContainer:"#ui-fs{$id} .ui-fs-result",
			input:"#ui-fs{$id} .ui-fs-input input",
			inputContainer:"#ui-fs{$id} .ui-fs-input",
			dropDownListContainer:"#ui-fs{$id} .ui-fs-list",
			inputDefaultTip:"输入好友姓名",
			noDataTip:"您的好友列表中不存在该好友",

			totalSelectNum:5,
			ajaxBefore:null,
			ajaxError:null,
			selectType:"multiple",


            ajaxUrl: TS + "/Friend/ajax",
            ajaxLoadAllUrl: TS + "/Friend/getAllFriends",
            ajaxGetCountUrl: TS + "/Friend/getCountUrl",
            ajaxGetFriendTypeUrl: TS + "/Friend/getFriendType",
            selectCallBack:function(fid, name, image) {
                alert("您选择的好友ID为"+fid);
                this.setDropDownListHide();
                this.setAllFriendHide();
            }
        });

        if( $( '#ui_fri_ids{$id}' ).val() ){
          $( '.ui-fs-result' ).css( 'display','block' );
        }
    });

/*function chooseAll(){alert('123');
}
function cancelAll(){alert('456');
}*/
</script>


<!-- 选择好友组件-->
<!--<div class="ui-fs-result clearfix" style="display:none;" id="show_choose"></div>-->
<div id="ui-fs{$id}" class="ui-fs">
	<div class="ui-fs-result clearfix" style="display:none;">
	</div>
	<div class="ui-fs-input">
		<input type="text" value="输入好友姓名" maxlength="30" />
		<a class="ui-fs-icon" href="javascript:void(0)">查看所有好友</a>
	</div>
	<div class="ui-fs-list">
		数据加载中....
	</div>
	<div class="ui-fs-all">
		<div class="top">
			<select id="ui-fs-friendtype{$id}"><option value="-1">所有好友</option></select>
<!--			<input id="chooseAll" type="checkbox" onclick="parent.chooseAll();" />全选
			<input id="cancelAll" type="checkbox" onclick="parent.cancelAll();" />全不选-->
			<div class="close">关闭</div>
		</div>
		<div class="ui-fs-allinner">
			<div class="page clearfix">
				<div class="llight1"></div>
				<div class="button"><span class="prev">上一页</span><span class="next">下一页</span></div>
			</div>
			<div class="list clearfix">
				数据加载中...
			</div>
		</div>
	</div>
</div>
<!--选择好友组件 end-->

<input type="hidden" id="ui_fri_ids{$id}" name="fri_ids{$id}"  dataType="LimitB" min="1"  msg="必须选择用户!"> 

<!-- <input type="hidden" id="{$id}" name="fri_ids{$id}"  dataType="LimitB" min="1"  msg="必须选择用户!"> -->
